package com.mzj.saas.mservice.lock.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * 智能锁记录表
 */
@Entity
@Table(name = "saas_smart_lock")
public class SmartLock {

    //	密码类型（1:指纹:2:密码;3:卡;11:人脸）
    public static final Integer PASSWORD_TYPE_FINGERPRINT = 1; //指纹
    public static final Integer PASSWORD_TYPE_NUMBER = 2; //密码
    public static final Integer PASSWORD_TYPE_CARD = 3; //门卡
    public static final Integer PASSWORD_TYPE_FACE = 11; //人脸

    //	永久标记（1：永久密码；2：临时密码）
    public static final Integer PERMANENT_FLAG_YES = 1; //永久密码
    public static final Integer PERMANENT_FLAG_NO = 2; //临时密码

    //密码权限(1:管理员 2:普通用户)
    public static final Integer PASSWORD_AUTH_TYPE_ADMIN = 1; //管理员
    public static final Integer PASSWORD_AUTH_TYPE_GENERAL = 2; //普通用户

    //对接平台类型 0：中国电信；1：中国移动
    public static final Integer BUTT_PLATFORM_TYPE_TELECOM = 0; //中国电信；
    public static final Integer BUTT_PLATFORM_TYPE_MOBILE = 1; //中国移动；

    public static final Integer AUTH_MODE_FACE= 1; //人脸
    public static final Integer AUTH_MODE_FINGERPRINT = 2; //指纹


    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    @Basic
    @Column(name = "name", nullable = true)
    private String name; //智能锁名称

    @Basic
    @Column(name = "mac", nullable = true)
    private String mac; //智能锁MAC

    @Basic
    @Column(name = "sn", nullable = true)
    private String sn; //智能锁SN

    @Basic
    @Column(name = "brand_id", nullable = true)
    private Long brandId; //品牌id

    @Basic
    @Column(name = "bind_type", nullable = true)
    private Integer bindType; //绑定类型:1单位 2个人

    @Basic
    @Column(name = "bind_status", nullable = true)
    private Integer bindStatus; //绑定状态: 1单位绑定 2个人绑定 3单位解绑

    @Basic
    @Column(name = "type", nullable = true)
    private Integer type; //锁类型：1房屋智能锁 2门禁智能锁

    @Basic
    @Column(name = "house_type", nullable = true)
    private Integer houseType; //房屋类型：1公租房 2物业房产

    @Basic
    @Column(name = "house_id", nullable = true)
    private String houseId; //房屋id

    @Basic
    @Column(name = "community_id", nullable = true)
    private String communityId; //小区id

    @Basic
    @Column(name = "community_name", nullable = true)
    private String communityName; //小区名称

    @Basic
    @Column(name = "build_id", nullable = true)
    private Long buildId; //楼栋id

    @Basic
    @Column(name = "build_name", nullable = true)
    private String buildName; //楼栋名称

    @Basic
    @Column(name = "unit_id", nullable = true)
    private Long unitId; //单元id

    @Basic
    @Column(name = "unit_name", nullable = true)
    private String unitName; //单元名称

    @Basic
    @Column(name = "room_number", nullable = true)
    private String roomNumber; //房号

    @Basic
    @Column(name = "electric_quantity", nullable = true)
    private Integer electricQuantity; //电量

    @Basic
    @Column(name = "volume", nullable = true)
    private Integer volume; //音量

    @Basic
    @Column(name = "signal_level", nullable = true)
    private Integer signalLevel; //信号:1强 2中 3弱

    @Basic
    @Column(name = "online_status", nullable = true)
    private Integer onlineStatus; //在线状态：0离线 1在线

    @Basic
    @Column(name = "org_id", nullable = true)
    private Long orgId; //产权所有人

    @Basic
    @Column(name = "org_name", nullable = true)
    private String orgName; //产权人名称

    @Basic
    @Column(name = "match_user_id", nullable = true)
    private String matchUserId; //承租人id

    @Basic
    @Column(name = "match_user_name", nullable = true)
    private String matchUserName; //承租人姓名

    @Basic
    @Column(name = "oauth_number", nullable = true)
    private Integer oauthNumber; //授权人数

    @Basic
    @Column(name = "mechine_status", nullable = true)
    private Integer mechineStatus; //设备状态:0未激活 1正常 2冻结

    @Basic
    @Column(name = "reason", nullable = true)
    private String reason; //冻结原因

    @Basic
    @Column(name = "operator_id", nullable = true)
    private String operatorId; //操作人

    @Basic
    @Column(name = "operator_org_id", nullable = true)
    private Long operatorOrgId; //操作人单位id

    @Basic
    @Column(name = "operator_time", nullable = true)
    private Date operatorTime; //操作时间

    @Basic
    @Column(name = "total_close_day", nullable = true)
    private Integer totalCloseDay; //累计未开门天数

    @Basic
    @Column(name = "last_open_time", nullable = true)
    private Date lastOpenTime; //最后一次开门时间

    @Basic
    @Column(name = "is_person_permission", nullable = true)
    private Integer isPersonPermission; //个人锁权限开关：0关 1开

    @Basic
    @Column(name = "status", nullable = true)
    private Integer status; //房屋类型：1整租 2合租

    @Basic
    @Column(name = "identification", nullable = true)
    private String identification;//天网互联密码标识

    public String getIdentification() {
        return identification;
    }

    public void setIdentification(String identification) {
        this.identification = identification;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public Long getBrandId() {
        return brandId;
    }

    public void setBrandId(Long brandId) {
        this.brandId = brandId;
    }

    public Integer getBindType() {
        return bindType;
    }

    public void setBindType(Integer bindType) {
        this.bindType = bindType;
    }

    public Integer getBindStatus() {
        return bindStatus;
    }

    public void setBindStatus(Integer bindStatus) {
        this.bindStatus = bindStatus;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getHouseType() {
        return houseType;
    }

    public void setHouseType(Integer houseType) {
        this.houseType = houseType;
    }

    public String getHouseId() {
        return houseId;
    }

    public void setHouseId(String houseId) {
        this.houseId = houseId;
    }

    public String getCommunityId() {
        return communityId;
    }

    public void setCommunityId(String communityId) {
        this.communityId = communityId;
    }

    public String getCommunityName() {
        return communityName;
    }

    public void setCommunityName(String communityName) {
        this.communityName = communityName;
    }

    public Long getBuildId() {
        return buildId;
    }

    public void setBuildId(Long buildId) {
        this.buildId = buildId;
    }

    public String getBuildName() {
        return buildName;
    }

    public void setBuildName(String buildName) {
        this.buildName = buildName;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public Integer getElectricQuantity() {
        return electricQuantity;
    }

    public void setElectricQuantity(Integer electricQuantity) {
        this.electricQuantity = electricQuantity;
    }

    public Integer getVolume() {
        return volume;
    }

    public void setVolume(Integer volume) {
        this.volume = volume;
    }

    public Integer getSignalLevel() {
        return signalLevel;
    }

    public void setSignalLevel(Integer signalLevel) {
        this.signalLevel = signalLevel;
    }

    public Integer getOnlineStatus() {
        return onlineStatus;
    }

    public void setOnlineStatus(Integer onlineStatus) {
        this.onlineStatus = onlineStatus;
    }

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    public String getMatchUserId() {
        return matchUserId;
    }

    public void setMatchUserId(String matchUserId) {
        this.matchUserId = matchUserId;
    }

    public String getMatchUserName() {
        return matchUserName;
    }

    public void setMatchUserName(String matchUserName) {
        this.matchUserName = matchUserName;
    }

    public Integer getOauthNumber() {
        return oauthNumber;
    }

    public void setOauthNumber(Integer oauthNumber) {
        this.oauthNumber = oauthNumber;
    }

    public Integer getMechineStatus() {
        return mechineStatus;
    }

    public void setMechineStatus(Integer mechineStatus) {
        this.mechineStatus = mechineStatus;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(String operatorId) {
        this.operatorId = operatorId;
    }

    public Long getOperatorOrgId() {
        return operatorOrgId;
    }

    public void setOperatorOrgId(Long operatorOrgId) {
        this.operatorOrgId = operatorOrgId;
    }

    public Date getOperatorTime() {
        return operatorTime;
    }

    public void setOperatorTime(Date operatorTime) {
        this.operatorTime = operatorTime;
    }

    public Integer getTotalCloseDay() {
        return totalCloseDay;
    }

    public void setTotalCloseDay(Integer totalCloseDay) {
        this.totalCloseDay = totalCloseDay;
    }

    public Date getLastOpenTime() {
        return lastOpenTime;
    }

    public void setLastOpenTime(Date lastOpenTime) {
        this.lastOpenTime = lastOpenTime;
    }

    public Integer getIsPersonPermission() {
        return isPersonPermission;
    }

    public void setIsPersonPermission(Integer isPersonPermission) {
        this.isPersonPermission = isPersonPermission;
    }
}
